#include "widget.h"
#include "ui_widget.h"

Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
}

Widget::~Widget()
{
    delete ui;
}

void Widget::paintEvent(QPaintEvent *)
{
    QPainter painter(this);
    QPixmap pix;
    pix.load("../010_image/gitee-logo-black.svg");
    painter.drawPixmap(0, 0, 150, 50, pix);

    painter.translate(50, 50);
    painter.drawPixmap(0, 0, 150, 50, pix);

    painter.rotate(90);         // 顺时针旋转90度
    painter.shear(0.5, 0);      // 横向扭曲
    painter.drawPixmap(0, 0, 150, 50, pix);
}

